﻿@using YL.Core.Dto;

@section styles{
    <style>
        #db div {
            border: 1px solid #111111;
        }

            #db div span {
                color: red;
                font-size: 18px;
            }

        .titleP {
            color: darkslateblue;
            font-weight: 600;
            font-size: 20px;
        }
    </style>
}

<div class="content-wrapper">
    <section class="content-header">
        <h1>
            报表管理
            <small>库存统计</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="#"><i class="fa fa-dashboard"></i> 首页</a></li>
            <li><a href="#">报表管理</a></li>
            <li class="active">库存统计</li>
        </ol>
    </section>
    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <div class="box-body">
                        <div class="container">
                            <table class="table table-bordered">
                                <thead>
                                    <tr>
                                        <th>物料</th>
                                        <th>库存</th>
                                        <th>初始值</th>
                                        <th>入库</th>
                                        <th>出库</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    @{
                                        var wareInfo = ViewBag.wareInfo as List<StockInfo>;
                                        foreach (var item in wareInfo)
                                        {
                                            <tr>
                                                <td>@item.MaterialName</td>
                                                <td>@item.WeightTotal</td>
                                                <td>@item.WeightInnit</td>
                                                <td>@item.WeightAdd</td>
                                                <td>@item.WeightMinus</td>
                                            </tr>
                                        }
                                    }
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>

@section scripts{
    <script type="text/javascript">
        var app = new Vue({
            el: '#app',
            data: {
                datemin: '@ViewBag.datemin',
                datemax: '@ViewBag.datemax'
            },
            mounted: function () {
                var _self = this;
                _self.$nextTick(function () {
                    //显示active
                    _self.$refs.ReportWareInfo.parentNode.parentNode.classList.add("active");
                    _self.$refs.ReportWareInfo.classList.add("active");
                })
            }
        });

    </script>
}
